from dataclasses import dataclass
from typing import Optional

@dataclass
class Character:
    """角色数据模型"""
    name: str
    personality: str
    role: str
    voice_id: Optional[str] = None
    description: Optional[str] = None
    
    def __post_init__(self):
        if not self.description:
            self.description = f"一个{self.personality}的{self.role}"